Resonance is part of valence bond theory.
Resonance structures are different Lewis structures for a species, written without violating the conventional rules of bonding.
Note: Only two structures have been shown in each case.
If a structure has a negative charge start shifting electrons from there.
If it has a positive charge move towards it.
If it is neutral and has an atom with a lone pair start from there.
To get different resonance structures either a one arrow (two electrons) or two arrow shifts can be used again without violating the rules.
In the above resonance structure a single arrow shift has been used. This results in a structure without violating any rules.
In the above scheme if only a single arrow shift is used then carbon will have five bonds which is not appropriate, a two arrow shift is a must.